cmake_minimum_required(VERSION 3.18)

project(FunctionScopDemo)

set(SCOP "Directory Scop")

function(print_var)
    # 1 获取父级目录遍历
    message("1 func: ${SCOP}")
    # 2 修改遍历
    set(SCOP "Function Scop")
    message("2 func: ${SCOP}")
endfunction(print_var)

print_var()
message("3 main: ${SCOP}")
